Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

339
Visualizações
What happens when you run the “build” script in parcel?

I’m a confused on what exactly the build script does and how it relates to deployment.

I know it it makes your project small by renaming variables, trimming white space, etc… but how does it work with deployment?

Do you only push the files that are generated by the build script?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

parcel build is used to create a production-ready bundle of files that can be deployed in various ways.

A very common workflow is to point parcel at an html file to build a client-side application that can be delivered by a file server (e.g. parcel build src/index.html). In this scenario, all the JavaScript is run by the user's browser, and the server is only responsible for serving the static files created by parcel build.

The core of the Heroku is a platform is focused on running server apps - i.e. apps that run most or a lot of their code on a server, not the browser. You mentioned the heroku "start" script (see docs), which is used in the context of such apps. If you're writing a heroku server application in, for example, nodejs, the start script would tell heroku what javascript file was the entry point to your node application (e.g. "start": "node dist/index.js". If you wanted to use parcel in such a project (e.g. to reduce the size of your server-side code so that heroku dynos might start up faster), you could run it in the context of a "build" command (e.g. "build": "parcel build/src/index.js").

If your application is entirely static html/js/css (i.e. the first scenario), I might consider another hosting platform like cloudflare pages or Amazon Amplify, which will probably be cheaper, faster and simpler. But if you want to use heroku, you need to set it up so that there is server code running that will deliver the static html/js/css files generated by parcel. There are many ways to do this - one would be to build a simple express app with the serve-static middleware, as described here.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda